package com.ontheroad.circle.service;

import cn.modoumama.service.base.BaseService;
import com.ontheroad.api.request.CircleRequest;
import com.ontheroad.api.request.CircleRequest.*;
import com.ontheroad.api.request.Request;
import com.ontheroad.api.response.CircleResponse;
import com.ontheroad.api.response.Response;
import com.ontheroad.circle.model.CircleModel;
import com.ontheroad.core.annotation.ValidateGroup;
import org.springframework.remoting.service.annotation.RemoteService;

import java.util.List;

/**
 * Created by kedong on 2017/6/29 0029.
 * 发现模块接口
 */
@RemoteService
public interface CircleService extends BaseService<CircleModel, Integer> {

    /**
     * 发布动态
     *
     * @param request
     * @return
     */
    Response publish(CircleRequest request) throws Exception;

    /**
     * 附近动态列表
     *
     * @param request
     * @return
     */
    @ValidateGroup(groups = getNearCircleList.class)
    Response getNearCircleList(CircleRequest request) throws Exception;

    /**
     * 好友动态列表
     *
     * @param request
     * @return
     */
    Response getFriendCircleList(CircleRequest request) throws Exception;


    /**
     * 通过用户ID查看某人的动态列表
     *
     * @param request
     * @return
     */
    @ValidateGroup(groups = getUserCircleList.class)
    Response getUserCircleList(CircleRequest request) throws Exception;


    /**
     * 封装动态列表
     *
     * @param list
     * @param request
     * @param isDistance
     * @param userId
     * @return
     */
    List<CircleResponse> getCircleList(List<CircleModel> list, CircleRequest request, boolean isDistance, Integer userId);


    /**
     * 查看我的主页
     *
     * @param request
     * @return
     */
    Response getIndex(CircleRequest request) throws Exception;

    /**
     * 查看动态详情
     *
     * @param request
     * @return
     */
    @ValidateGroup(groups = getCircleDetail.class)
    Response getCircleDetail(CircleRequest request) throws Exception;

    /**
     * 给动态点赞
     *
     * @param request
     * @return
     */
    @ValidateGroup(groups = like.class)
    Response like(CircleRequest request) throws Exception;

    /**
     * 撤销点赞
     *
     * @param request
     * @return
     */
    @ValidateGroup(groups = like.class)
    Response unLike(CircleRequest request) throws Exception;

    /**
     * 评论
     *
     * @param request
     * @return
     */
    @ValidateGroup(groups = comment.class)
    Response comment(CircleRequest request) throws Exception;

    /**
     * 获取评论列表
     *
     * @param request
     * @return
     */
    @ValidateGroup(groups = getCommentList.class)
    Response getCommentList(CircleRequest request) throws Exception;

    /**
     * 点赞列表
     *
     * @param request
     * @return
     */
    @ValidateGroup(groups = likeList.class)
    Response likeList(CircleRequest request) throws Exception;

    /**
     * 获取精选动态列表
     *
     * @param request
     * @return
     */
    Response careChosenList(Request request) throws Exception;

    Response delete(CircleRequest request) throws Exception;

    void updateCareChooseByIds(Integer integer, Boolean careChose);
}
